#ifndef __LOG_H___
#define __LOG_H___

#include "std_def.h"
#include <iostream>
#include <fstream>
#include <stdarg.h>

class Log
{
public:
	Log(void);
	virtual ~Log(void);

	static Log* getNewInstance() {
		if(Log::plog == NULL) {
			Log::plog = new Log();
      }
      return plog;
	}
	static Log* getInstance() {
		return Log::plog;
	}

	void setLogFile(std::string);
	void open();
	void close();
	void print(const char *, ...);

protected:
	static Log    *plog;
	FILE          *pFile;
	std::string    filename;
};

#endif //__LOG_H___
